<template>
  <div>
    <div class="seed_top_banner">
      <div class="seed_back_arrow" @click="back">
        <svg class="icon" aria-hidden="true">
          <use xlink:href="#icon-zuo"></use>
        </svg>
      </div>
      <div class="seed_page_title"><span>小程序设置</span></div>
      <div class="seed_page_tool"></div>
    </div>
    <!--列表-->
    <div class="seed_my_mini_set_con">
      <div class="seed_my_mini_set_list_box" v-for="(item, index) in list" v-bind:key="index">
        <div class="seed_my_set_line"></div>
        <div class="seed_my_mini_set_list">
          <div class="seed_my_mini_list_inner1"></div>
          <div class="seed_my_mini_list_inner">
            <div class="seed_my_mini_list_inner2">
              <div class="seed_my_mini_list_inner2_l">
                <img src="@/assets/images/xcxgl.png" style="width: 1.4rem;vertical-align: middle;margin-top: -0.3rem"/>&ensp;
                {{item.app_name}}
              </div>
              <div class="seed_my_mini_set_list_inner2_r">
                <button @click="edit(item.app_id)">设置</button>
              </div>
            </div>
            <div class="seed_my_mini_list_inner3">
              <p>当前版本&emsp;&emsp;&emsp;&emsp;{{item.type_name}}</p>
              <p>有效期至&emsp;&emsp;&emsp;&emsp;{{item.expir_time}}</p>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data () {
    return {
      list: []
    }
  },
  created () {
    this.getMiniAppList()
  },
  methods: {
    back () {
      this.$router.push({name: 'my-my'})
    },
    getMiniAppList () {
      this.$request.MiniAppList().then(data => {
        this.list = data
      })
    },
    edit (id) {
      this.$router.push({name: 'my-mini_app_edit', params: {id: id}})
    }
  }
}
</script>
